/*
 * ============================================================================
 * Copyright Notice!
 * ----------------------------------------------------------------------------
 * This file contains proprietary and confidential information belonging to the
 * group of people involvled in developing this project.  Reproduction, disclosure 
 * or use without specific written authorization from project stake holders is 
 * prohibited. Please refer the readme.txt in project installation folder for more
 * specific contacts
 *
 * All rights reserved.
 * ============================================================================
 */
package edu.uwm.universitydb.service;

import edu.uwm.universitydb.service.dept.DepartmentService;
import edu.uwm.universitydb.service.dept.DepartmentServiceImpl;
import edu.uwm.universitydb.service.login.LoginService;
import edu.uwm.universitydb.service.login.LoginServiceImpl;
import edu.uwm.universitydb.service.professor.ProfessorService;
import edu.uwm.universitydb.service.professor.ProfessorServiceImpl;
import edu.uwm.universitydb.service.project.ProjectService;
import edu.uwm.universitydb.service.project.ProjectServiceImpl;
import edu.uwm.universitydb.service.student.StudentService;
import edu.uwm.universitydb.service.student.StudentServiceImpl;
import edu.uwm.universitydb.service.user.UserService;
import edu.uwm.universitydb.service.user.UserServiceImpl;

/**
 * <code>ServiceFactory</type> here
 * 
 * Factory classes for creating services. implemented as Singleton
 * 
 * @author Shyam Nair
 */
public class ServiceFactory
{
    /** attribute holding the factory items */
    private static final ServiceFactory FACOTRY;
    
    static
    {
        // Initialize the factory
        FACOTRY = new ServiceFactory();
    }
    
    /**
     * reducing the visibility of constructor to avoid instantiation
     */
    private ServiceFactory()
    {
        // DO NOTHING
    }
    
    /**
     * <code>getLoginService(...)</code> 
     * 
     * @return
     */
    public LoginService getLoginService()
    {
        return new LoginServiceImpl();
    }
    
    /**
     * <code>getuserService(...)</code> 
     * 
     * @return
     */
    public UserService getUserService()
    {
        return new UserServiceImpl();
    }

    /**
     * <code>getDepartmentService(...)</code>
     * 
     * @return
     */
    public DepartmentService getDepartmentService()
    {
        return new DepartmentServiceImpl();
    }
    
    /**
     * <code>getProfessorService(...)</code>
     * 
     * @return
     */
    public ProfessorService getProfessorService()
    {
        return new ProfessorServiceImpl();
    }
    
    /**
     * <code>getStudentService(...)</code>
     * 
     * @return
     */
    public StudentService getStudentService()
    {
        return new StudentServiceImpl();
    }
    
    /**
     * <code>getProjectService(...)</code>
     * 
     * @return
     */
    public ProjectService getProjectService()
    {
        return new ProjectServiceImpl();
    }
    
    /**
     * 
     */
    public static ServiceFactory getInstance()
    {
        return FACOTRY;
    }
}
/*
 * ============================================================================
 * Change History
 * ----------------------------------------------------------------------------
 * Apr 9, 2014   Shyam Nair
 * File created
 * ----------------------------------------------------------------------------
 * Apr 19, 2014   Shyam Nair
 * added methods getStudentService(), getProfessorService()
 * ----------------------------------------------------------------------------
 */